package collection;

import java.util.ArrayList;
import java.util.List;

public class ListDemo3 {
    public static void main(String[] args) {
        List<Integer> str = new ArrayList<>();
        for (int i=0;i<10;i++){
            str.add(i*10);
        }
        System.out.println("str:"+str);

        List<Integer> sub = str.subList(3,6);
        System.out.println("sub:"+sub);

        for (int i=0;i<sub.size();i++){
            sub.set(i,sub.get(i)*10);
        }
        System.out.println("str:"+str);
        System.out.println("sub:"+sub);

        sub.add(0,9999);
        System.out.println("str:"+str);
        System.out.println("sub:"+sub);

        /*
        str.remove(0);
        System.out.println("str:"+str);
        System.out.println("sub:"+sub);

         */





    }
}
